package com.yqg.protection.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yqg.protection.controller.dto.MouthDataDto;
import com.yqg.protection.controller.dto.WarnRecordCountDto;
import com.yqg.protection.entity.WarnRecord;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zxf
 * @since 2024-01-01
 */
@Mapper
public interface WarnRecordMapper extends BaseMapper<WarnRecord> {

    List<WarnRecord> findPage(Integer pageNum, Integer pageSize, String clientName, String equipmentName, String equipmentId, Integer level, Long organizationId, String isMisinformation, String warnTypeNum, String warnStateNum, Integer isDeal, String startTime, String endTime, String isAllClient, List<Long> clientIds, Long id);

    Long findPageCount(String clientName, String equipmentName, String equipmentId, Integer level, Long organizationId, String isMisinformation, String warnTypeNum, String warnStateNum, Integer isDeal, String startTime, String endTime, String isAllClient, List<Long> clientIds);

    Integer findTodayWarnCount(Long organizationId, Integer level, String isAllClient, List<Long> clientIds);

    Integer findYesterdayWarnCount(Long organizationId, Integer level, String isAllClient, List<Long> clientIds);

    Integer findWarnEquipmentCount(Long organizationId, Integer level, String isAllClient, List<Long> clientIds);

    List<WarnRecord> selectlist(Integer level, Long organizationId, String isAllClient, List<Long> clientIds, Long clientId);

    List<WarnRecord> todayAllPage(Integer pageNum, Integer pageSize,Integer level, Long organizationId, String isAllClient, List<Long> clientIds, String startTime, String endTime);

    List<WarnRecord> selectTodaylist(Integer level, Long organizationId, String isAllClient, List<Long> clientIds, String startTime, String endTime, Long clientId);

    List<WarnRecord> exportData(String clientName, String equipmentName, String equipmentId, Integer level, Long organizationId, String isMisinformation, String warnTypeNum, String warnStateNum, Integer isDeal, String startTime, String endTime, String isAllClient, List<Long> clientIds);

    List<MouthDataDto> findMouthData(Integer level, Long organizationId, Long clientId, String isMisinformation, String startTime, String endTime, String isAllClient, List<Long> clientIds);

    List<WarnRecordCountDto> findWarnRecordCountDto(Long clientId, String warnStateNum, String startTime, String endTime);

    List<MouthDataDto> findPdfMouthData(Long clientId, String startTime, String endTime);

    List<WarnRecord> selectPDFMouthlist(String startTime, String endTime, Long clientId);

    List<WarnRecord> findPageApp(Integer pageNum, Integer pageSize, Integer level, Long organizationId, Integer isDeal, String isAllClient, List<Long> clientIds, Long equipmentInputStoreId);

    Long findPageAppCount(Integer level, Long organizationId, Integer isDeal, String isAllClient, List<Long> clientIds, Long equipmentInputStoreId);

    List<Map<String, Integer>> getCountByState(Integer level, Long organizationId, String isAllClient, List<Long> clientIds);
}
